body { margin: 0; padding: 0; background: #f5f6fa; display: flex; min-height: 100vh; font-family: Arial, sans-serif; }
.main-wrapper { display: flex; width: 100%; }
.sidebar {
    width: 240px;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    padding: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.07);
    min-height: 100vh;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.sidebar h3 {
    color: #fff;
    font-weight: bold;
    text-align: center;
    padding: 32px 0 16px 0;
    letter-spacing: 2px;
    font-size: 1.3rem;
    margin-bottom: 0;
}
.sidebar ul {
    list-style: none;
    padding: 0 0 32px 0;
    margin: 0;
    flex: 1;
}
.sidebar ul li {
    margin: 0;
}
.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 14px 32px;
    color: #e3e6f0;
    text-decoration: none;
    font-size: 1.08rem;
    border-left: 4px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border-radius: 0 24px 24px 0;
    margin-bottom: 2px;
}
.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left: 4px solid #f6c23e;
    font-weight: bold;
}
.main-content { flex-grow: 1; padding: 40px 20px 20px 20px; background-color: #f5f6fa; }
.info-card { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); margin-bottom: 20px; }

/* 表单样式 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem; /* Add bottom margin to the row */
}

.form-group {
    flex: 0 0 calc(50% - 20px); /* Set basis to 50% minus half of the gap */
    max-width: calc(50% - 20px); /* Ensure it doesn't grow too much */
    margin-right: 20px; /* Add right margin for gap */
}

.form-group:last-child {
    margin-right: 0; /* Remove right margin for the last item in a row */
}

/* Handle rows with only one item */
.form-row > .form-group:only-child {
    flex: 0 0 100%;
    max-width: 100%;
    margin-right: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
}

/* 头像上传区域样式 */
.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #ccc;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-area {
    width: 100px;
    height: 100px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2rem;
    color: #ccc;
    margin-bottom: 10px;
    background-color: #f8f9fa;
}

.avatar-upload-area:hover {
    border-color: #007bff;
    color: #007bff;
    background-color: #e9ecef;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    margin-top: 15px; /* 添加顶部间距 */
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 调整头像所在的 form-row 布局 */
#personalInfoForm .form-row:first-child {
    align-items: center; /* 垂直居中对齐 */
}

#personalInfoForm .form-row:first-child .form-group:first-child {
    flex: 0 0 auto; /* 不伸缩 */
    max-width: none; /* Remove max-width for this specific form group */
    margin-right: 15px; /* 增加标签和头像的间距 */
    display: flex;
    align-items: center;
}

#personalInfoForm .form-row:first-child .form-group:last-child {
    flex-grow: 1; /* Allow it to take available space */
    flex-basis: 0; /* Allow it to shrink */
    max-width: none; /* Remove max-width */
    margin-right: 0; /* Remove margin */
}